In the related art, a 4K sector Hard Disk Drive (HDD), which performs 512 emulation, is known. The 4K sector HDD refers to an HDD using 4K bytes (4096 bytes (4 KiB)) as one sector, which is the smallest unit of data recorded on a disk (medium).
The 512 emulation refers to an emulation performed so that, although 1 sector=4096 bytes on the disk, it becomes 512 bytes/sector on an I/F (interface) with respect to a host device such as a PC or a server. Hereinafter, a 4K sector HDD performing the 512 emulation will be referred to as a “4K sector HDD (512E)”.
Use of HDDs, which regard 512 bytes as one sector, predates the advent of 4K sector HDDs, and not a small number of host devices issue write commands with respect to HDDs in a 512 byte unit in conformity with HDDs of 512 bytes/sector.
A 4K sector HDD (512E) provides, in order to secure compatibility with a host device issuing a write command in a 512 byte unit as described above, the same I/F with respect to the host device as in the case of an HDD of 512 bytes/sector. Therefore, the host device can perform access to the 4K sector HDD (512E) using the same command and data size as in the case of access to an HDD of 512 bytes/sector.
In the case of a 4K sector HDD (512E), then, Read Modify Write (hereinafter, referred to as RMW) may be occurred in response to a write command from the host device. Hereinafter, RMW will be described with reference to FIG. 14 and FIG. 15.
FIG. 14 is a diagram illustrating an operation example of RMW by a 4K sector HDD (512E), and FIG. 15 is a diagram illustrating a correspondence between a Logical Block Address (LBA) and a sector in connection with the 4K sector HDD (512E).
As illustrated in FIG. 14, an information processing system 100 includes a storage device 200 and a host device 300. The host device 300 is an information processing device such as a PC or a server, and is configured to issue a write command and a read command in a 512 byte unit. The storage device 200 includes a controller module 400 and a 4K sector HDD (512E) 500. Hereinafter, the 4K sector HDD (512E) 500 will be simply referred to as an HDD 500.
The controller module 400 is a control device configured to perform access with respect to the HDD 500 in response to an access request from the host device 300, and includes a memory 410 configured to temporarily store write data, which is output to the HDD 500, and read data, which has been read from the HDD 500, and the like. The HDD 500 is a 4K sector HDD (512E), and includes a memory 510 configured to temporarily store read/write data exchanged with respect to the controller module 400 and a memory area (disk) 520 configured to memorize data.
The HDD 500, as illustrated in FIG. 15, manages 512 bytes as one block on an I/F with respect to the host device 300 and, on the other hand, manages 4096 bytes as one block (sector) on the disk. The host device 300, when performing access to the HDD 500 connected under the control of the controller module 400, designates an LBA of a 512 byte unit, which can be recognized by the host device 300 by means of the I/F of the HDD 500, and issues a command.
In the example of FIG. 15, LBAs #00 to #15 are blocks of 512 bytes, respectively, and sectors #0 and #1 are blocks of 4096 bytes, respectively. Furthermore, LBAs #00 to #07 correspond to sector #0 of the HDD 500, and LBAs #08 to #15 correspond to sector #1 of the HDD 500.
In connection with the information processing system 100 illustrated in FIG. 14, when a write command for writing write data of 512 bytes in LBA #02 is issued from the host device 300, the controller module 400 temporarily retains the write data in the memory 410. At this time, the controller module 400 manages the write data using a data block of a 512 byte unit.
The controller module 400 then writes the write data, which is retained in the memory 410, to the HDD 500 asynchronously (refer to arrow (1) in FIG. 14). The HDD 500, upon receiving the write data, reads data block #0 of 4096 bytes including LBA #02, which is the block to be written, from the memory area 520 to the memory 510 (refer to arrow (2) in FIG. 14).
Subsequently, the HDD 500 merges the data of 4096 bytes, which has been read from the memory area 520, and the write data received from the controller module 400 (refer to arrow (3) in FIG. 14). That is, the HDD 500 modifies data of 512 bytes in an area, which corresponds to LBA #02, among the data of 4096 bytes that has been read, with the write data.
Finally, the HDD 500 writes the post-merge data of 4096 bytes, which is held in the memory 510, to the memory device 520 (refer to arrow (4) in FIG. 14).
As described above, a 4K sector HDD (512E), upon receiving write data of less than 4096 bytes which correspond to one sector, performs the RMW indicated by (2) to (4) in FIG. 14.
A technology is also known, as a relevant technology, which enables recording of user data, without performing Read Modify, in an optical disk and the like that include unrecorded Error Correction Code (ECC) blocks (for example, refer to Patent Literature 1). According to this technology, when an optical disk device is commanded to record user data in a sector within an unused ECC block, it adds dummy data to user data, which has been transmitted from the host device, without performing RMW. The optical disk device then records the user data in the target ECC block with the data length being made equal to one ECC block by addition of dummy data.
A technology is also known, as another relevant technology, which increases the processing rate, in the case of a hard disk drive device configured to read/write in a disk in a 4K byte unit, when modifying management data of 512 bytes memorized in the disk (for example, refer to Patent Literature 2). According to this technology, a hard disk drive device has data of 4K bytes, which includes management data, memorized in advance in the cache memory; and, in response to a data write command, updates the management data inside the cache memory using management data from the PC. The hard disk drive device then writes data of 4K bytes, which includes the updated management data, from the cache memory to the disk.
[Patent Literature 1] Japanese Laid-open Patent Publication No. 10-106170
[Patent Literature 2] Japanese Laid-open Patent Publication No. 2012-113789
If the above-mentioned RMW occurs in the case of a 4K sector HDD (512E) 500, degradation of performance of the HDD may occur, compared with an HDD of 512 bytes/sector.
Specifically, when an HDD of 512 bytes/sector receives write data of 512 bytes, for example, it performs seek processing for the purpose of writing and write processing of write data. In contrast, a 4K sector HDD (512E) performs, when RMW occurs, not only processing as in the case of an HDD of 512 bytes/sector, but also seek processing for the purpose of reading, data read processing, and merge processing (refer to (2) to (4) of FIG. 14). As such, processing of RMW has an overhead larger than that of data writing by an HDD of 512 bytes/sector.
Particularly, when it comes to seek processing that takes a number of ms, it is performed once for the purpose of writing in the case of an HDD of 512 bytes/sector, whereas it is performed twice, in the case of RMW, for the purpose of reading and writing.
As such, RMW by a 4K sector HDD (512E) is more likely to degrade the HDD performance, as long as the HDD alone is concerned, than writing of data by an HDD of 512 bytes/sector.
Furthermore, according to the above-mentioned technology of adding dummy data to user data, the user data, to which dummy data has been added, is recorded into an unused ECC block, but no consideration is made regarding records inside blocks, in which data is already memorized.
In addition, according to the above-mentioned technology of having data of 4K bytes memorized in the cache memory in advance, the time and ratio of occupation of the cache memory increase, reducing the area of the cache memory that can be used as a cache with respect to the disk. Such reduction of the available area of the cache memory raises the possibility of cache miss, compared with an HDD having a cache memory of the same capacity, and possibly degrades the performance of the HDD.
Although examples of RMW occurring in the case of a 4K sector HDD (512E) have been described so far, the same problem occurs to other memory devices that store write data using a size different from the inputted smallest size (unit) and perform processing similar to RMW. Examples of such memory devices include flash memories such as a Solid State Drive (SSD) or a Universal Serial Bus (USB) memory, which memorizes write data in a page unit of 4K bytes or the like.